#ifndef ALFS_LANGUAGE_SUPPORT_EXCEPTION_THROWING_HPP
#define ALFS_LANGUAGE_SUPPORT_EXCEPTION_THROWING_HPP
#include    <alfs/config.hpp>

// File [alfs/language_support/exception_throwing.hpp].
//
// (c) copyright Alf P. Steinbach 2008.
// Use, modification and distribution are subject to the "New BSD License"
// as listed at <url: http://www.opensource.org/licenses/bsd-license.php>.

#include    <stdexcept>             // std::runtime_error
#include    <string>                // std::string
#include    "general_macros.h"      // FUNCATTR_NORETURN, DUMMY_RETURN

#define ALFS_MAY_THROW              // To indicate no exception specification on func.

namespace alfs{

    FUNCATTR_NORETURN
    inline bool throwX( std::string const& s )
    {
        throw std::runtime_error( s );
        DUMMY_RETURN(false);
    }

    FUNCATTR_NORETURN
    inline bool throwX( char const s[] )
    {
        throw std::runtime_error( s );
        DUMMY_RETURN(false);
    }

}  // alfs

#endif
